package com.navi.loaddata.core.mesEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.io.Serializable;

/**
 * Created by Jay on 2018/3/8.
 */
@Entity
public class MesProductspecPK implements Serializable {
    private String factoryname;
    private String productspecname;
    private String productspecversion;

    @Id
    @Column(name = "FACTORYNAME")
    public String getFactoryname() {
        return factoryname;
    }

    public void setFactoryname(String factoryname) {
        this.factoryname = factoryname;
    }

    @Id
    @Column(name = "PRODUCTSPECNAME")
    public String getProductspecname() {
        return productspecname;
    }

    public void setProductspecname(String productspecname) {
        this.productspecname = productspecname;
    }

    @Id
    @Column(name = "PRODUCTSPECVERSION")
    public String getProductspecversion() {
        return productspecversion;
    }

    public void setProductspecversion(String productspecversion) {
        this.productspecversion = productspecversion;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MesProductspecPK that = (MesProductspecPK) o;

        if (factoryname != null ? !factoryname.equals(that.factoryname) : that.factoryname != null) return false;
        if (productspecname != null ? !productspecname.equals(that.productspecname) : that.productspecname != null)
            return false;
        if (productspecversion != null ? !productspecversion.equals(that.productspecversion) : that.productspecversion != null)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        int result = factoryname != null ? factoryname.hashCode() : 0;
        result = 31 * result + (productspecname != null ? productspecname.hashCode() : 0);
        result = 31 * result + (productspecversion != null ? productspecversion.hashCode() : 0);
        return result;
    }
}
